#include "RenderableError.h"

//Global Utilities
#include "../../Utilities.h"

RenderableError::RenderableError(const std::string& message, Renderable *d):GLError(message)
{
	_renderable=d;
}

std::string RenderableError::message()
{
	std::string result="";
	std::string dId=getString<unsigned int>(_renderable->id());

	if ((_renderable) && (dId.length()))
		result="[Renderable:"+dId+"] ";
	
	result+=GLError::message();
	
	return result;
}

Renderable* RenderableError::renderable()
{
	return _renderable;
}
